package org.goldenport.g3.sample

import org.goldenport.g3._
import org.goldenport.g3.messages._
import org.goldenport.g3.messages.datastore._
import org.goldenport.g3.messages.sql.VARCHAR

/**
 * @since   Aug. 17, 2010
 * @version Aug. 19, 2010
 * @version Dec.  4, 2011
 * @author  ASAMI, Tomoharu
 **/
class DataStoreCreate extends G3Application with UseRecord {
  datastore('myds)

  val cmd = Create(
    DataStoreChannelSpec.KIND_NAME,
    Schema(IdField,
           Field('name, XString),
           'zip,
           ('address, XString),
           ('phone, XToken, MZeroMore),
           ('comment, XString, Property(VARCHAR(2048))))
  )

  start(cmd) invoke("myds")
}
